#ifndef __ECHO_SERVER_H__
#define __ECHO_SERVER_H__

#include <iostream>
#include "nce_proxy.h"
#include "nce_servant.h"

using namespace nce;
using namespace std;

class EchoServer : public Servant
{
public:
    EchoServer(string servName, int port) : Servant(servName, port) {}
    virtual ~EchoServer(){}
    virtual string& echo(const string &input, string &output) = 0;
private:
    int process(InputBuffer &ib, OutputBuffer &ob);
};

class EchoServerProxy : public Proxy
{
public:
    EchoServerProxy(string servName, string hostName, int port) : Proxy(servName, hostName, port) { cout << "echoserverProxy()" << endl; }
    virtual string& echo(const string &input, string &output);
};

#endif
